def menu(code, name, price, kouwei):
    print(code, name, price, kouwei)
    with open('menu.txt', 'a', encoding='utf-8') as f:
        f.write(f'{code} {name} {price} {kouwei}\n')


menu(1, '鱼香肉丝', 25.0, '甜酸辣')
menu(2, '番茄炒蛋', 17.0, '甜酸')
